package design.patterns.behavioral.state;

/**
 * @author gjx
 * @version v1.0
 * @Description
 * @date 2019/4/10 15:19
 */
public class AttackHeroState extends HeroState {


    @Override
    public void run() {
        System.out.println("英雄进入行走状态......");
        hero.setRunState(Hero.runHeroState);
    }

    @Override
    public void attack() {
        System.out.println("英雄正在攻击中....");
    }

    @Override
    public void frozen() {
        System.out.println("英雄被冰冻了......");
        hero.setRunState(Hero.frozenHeroState);
    }
}
